﻿using System;
using BikeBouncer.BusinessLayer.Enums;
using Devv.Core.UniDataTier;

namespace BikeBouncer.BusinessLayer
{
	public partial class DataAccess
	{
		#region General methods

		public static void SetEntityStatus(DataHandler db, EntityStatus status)
		{
			if (status == EntityStatus.OnlyActive)
			{
				db.AddParameter("@Active", true);
			}
			else if (status == EntityStatus.OnlyInactive)
			{
				db.AddParameter("@Active", false);
			}
			else
			{
				db.AddParameter("@Active", DBNull.Value);
			}
		}

		#endregion
	}
}